<div class="row"> <h3 class="page-header">使用管理</h3></div>
<div class="row">
    <div class="panel panel-default">
        <div class="panel-body">
            <form action='{:U("Yqgl/index")}' class="form-inline text-right fr m-b-5">
                名称：<input type="text" name='name' value='{$Think.get.name}' class="form-control mr20 w150" >
                <button class="btn btn-primary" type="submit">搜索</button>
            </form>
            <div class="table-responsive">
                <table class="table table-striped table-bordered table-hover">
                    <thead>
                    <tr>
                        <th>序号</th>
                        <th>设备编号</th>
                        <th>设备名称</th>
                        <th>系部</th>
                        <th>所属实验中心</th>
                        <th>所属实验室</th>
                        <th>学生人数</th>
                        <th>实训项目</th>
                        <th>班级</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                     <empty name="list">
                            <tr><td colspan="10" align="center">暂无信息</td></tr>
                        </empty>
                    <volist name="list" id="list">
                        <tr>
                            <td>{$i}</td>
                            <td>{$list.number}</td>
                            <td>{$list.name}</td>
                            <td>{$list.xibu}</td>
                            <td>{$list.sys_zx}</td>
                            <td>{$list.sys}</td>
                            <td>{$list.stu_num}</td>
                            <td>{$list.sx_xm}</td>
                            <td>{$list.class}</td>
                            <td><eq name="list.status" value='2'>未归还<else/>已归还</eq></td>
                            <td><eq name="list.status" value='1'>—<else/><button  data-url='{:U("Yqgl/gh?id=".$list["id"])}' class='btn btn-primary GhBtn'>归还</button></eq></td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
            </div>
            {$page}
        </div>
    </div>
</div>
<script type="text/javascript">
$('.print').click(function(){
    var obj = $('.print_item:checked');
    if(obj.length > 5){
        alert('每页A4纸只能打印5个产品哦');
    }else if(obj.length > 0){
        var ids = 0;
        obj.each(function(i, v){
            ids += ',' + $(v).val();
        });
        window.open('{:U("Product/prints")}?ids=' + ids);
    }else{
        alert('请选择打印项');
    }
});
</script>